home *** CD-ROM | disk | FTP | other *** search
- -- stack: in
- -- format: 8 (HyperCard 1)
- -- flags: 0x0 (none)
- -- protect password hash: 0
- -- maximum user level: 5 (scripting)
- -- window: Rect(x1=0, y1=0, x2=0, y2=0)
- -- screen: Rect(x1=0, y1=0, x2=0, y2=0)
- -- card dimensions: w=0 h=0
- -- scroll: x=0 y=0
- -- background count: 2
- -- first background id: 2649
- -- card count: 4
- -- first card id: 2968
- -- list block id: 2184
- -- print block id: 0
- -- font table block id: 0
- -- style table block id: 0
- -- free block count: 0
- -- free size: 0 bytes
- -- total size: 38176 bytes
- -- stack block size: 7680 bytes
- -- created by hypercard version: 0x00000000
- -- compacted by hypercard version: 0x00000000
- -- modified by hypercard version: 0x00000000
- -- opened by hypercard version: 0x00000000
- -- patterns[0]: 0x0000000000000000
- -- patterns[1]: 0x8000000008000000
- -- patterns[2]: 0x8800220088002200
- -- patterns[3]: 0x8888222288882222
- -- patterns[4]: 0x88AA22AA88AA22AA
- -- patterns[5]: 0xCCAA33AACCAA33AA
- -- patterns[6]: 0xEEAABBAAEEAABBAA
- -- patterns[7]: 0xEEBBBBEEEEBBBBEE
- -- patterns[8]: 0xFFBBFFEEFFBBFFEE
- -- patterns[9]: 0xFFBBFFFFFFBBFFFF
- -- patterns[10]: 0x8010022001084004
- -- patterns[11]: 0xFFFFFFFFFFFFFFFF
- -- patterns[12]: 0x8822882288228822
- -- patterns[13]: 0x1122448811224488
- -- patterns[14]: 0xC4800C6843023026
- -- patterns[15]: 0xB130031BD8C00C8D
- -- patterns[16]: 0xAA00AA00AA00AA00
- -- patterns[17]: 0x8822552288225522
- -- patterns[18]: 0x8855225588552255
- -- patterns[19]: 0x77DD77DD77DD77DD
- -- patterns[20]: 0x8000000000000000
- -- patterns[21]: 0xAA55AA55AA55AA55
- -- patterns[22]: 0x038448300C020101
- -- patterns[23]: 0x8244394482010101
- -- patterns[24]: 0x8814224188412214
- -- patterns[25]: 0x8080413E080814E3
- -- patterns[26]: 0x22048C7422179810
- -- patterns[27]: 0xBE808808EB088880
- -- patterns[28]: 0x25C8328964244C92
- -- patterns[29]: 0xA29C41BE2AC914EB
- -- patterns[30]: 0x40A00000040A0000
- -- patterns[31]: 0x8040200002040800
- -- patterns[32]: 0xAA00800088008000
- -- patterns[33]: 0xFF80808080808080
- -- patterns[34]: 0x081C22C180010204
- -- patterns[35]: 0xFF808080FF080808
- -- patterns[36]: 0xF87422478F172271
- -- patterns[37]: 0xBF00BFBFB0B0B0B0
- -- patterns[38]: 0xFF7FBE5DA2418000
- -- patterns[39]: 0xFAF5FAF5A050A050
- -- checksum: 0x0
- ----- HyperTalk script -----
- on openStack -- initial setup
- global NeedPack
- put false into NeedPack
- hide menubar
- end openstack
- on closeStack
- global NeedPack
- choose browse tool
- if NeedPack then
- put the userLevel into OldLevel
- set the userLevel to 4
- set the location of message to 22,14
- show message
- put "Recovering Free Space From Stack" into Message
- doMenu "Compact Stack"
- hide message
- set the location of message to 16,216
- set the userLevel to OldLevel
- end if
- show menubar
- end closeStack
-
- on RunClock -- this paragraph does it all
- global TestRun
- set cursor to 4
- hide menuBar
- Put the userLevel into OldLevel
- Set the userLevel to 4
- if OldLevel > 2 or the number of cards <> 5 then SetupClock1
- SetupClock2
- SetTZero
- set lockScreen to false
- visual effect dissolve
- go to card 4
- if TestRun then DoTest
- else DoClock
- Set the userLevel to OldLevel
- go to card 1
- end RunClock
-
- on DoClock -- do the clock countdown
- global TZero, SL
- put 0 into TNow
- put 1 into SL
- repeat until SL <= 0 or the mouse is down
- if the seconds <> TNow then
- put the seconds into TNow
- put TZero - TNow into SL
- dSL
- end if
- end repeat
- if the mouse is up then dZero
- end DoClock
-
- on SetTZero
- global TZero
- go to card 1
- put card field hours into H
- if H = 12 then put 0 into H
- if the hilite of button PM = true then add 12 to H
- put the seconds into TZero
- convert TZero to dateItems
- put H into item 4 of TZero
- put card field minutes into item 5 of TZero
- put 0 into item 6 of TZero
- convert TZero to seconds
- if TZero < the seconds then add 86400 to TZero
- end SetTZero
-
- on DoTest -- perform a test run
- global SL
- put 10362 into SL
- dSL
- wait 3 seconds
- put 2456 into SL
- dSL
- wait 3 seconds
- put 28 into SL
- dSL
- wait 3 seconds
- hide card field 1
- hide card field 2
- d5
- wait 30
- d4
- wait 30
- d3
- wait 30
- d2
- wait 30
- d1
- wait 30
- d0
- dZero
- end DoTest
-
- on SetupClock1 -- create & initilize cards 4 & 5
- global NeedPack
- put true into NeedPack
- set the location of message to 22,14
- show message
- put "SETUP: 1 of 5 - Deleting Old Card 5" into Message
- repeat while the number of cards > 4
- go to card 5
- doMenu "Delete Card"
- end repeat
- put "SETUP: 2 of 5 - Creating Card 5" into Message
- go to card 4
- doMenu "New Card"
- go to card 3
- choose field tool
- click at the location of card field 1
- doMenu "Copy Field"
- go to card 5
- doMenu "Paste Field"
- set the location of card field 1 to 256,171
- set showLines of card field 1 to false
- set style of card field 1 to transparent
- put "SETUP: 3 of 5 - Setting Card 4 Fields" into Message
- go to card 4
- show card field 1
- show card field 2
- choose field tool
- click at the location of card field 2
- doMenu "Clear Field"
- go to card 2
- click at the location of card field 1
- doMenu "Copy Field"
- go to card 4
- doMenu "Paste Field"
- choose browse tool
- set the location of card field 2 to 256,68
- set style of card field 2 to transparent
- set showLines of card field 2 to false
- end SetupClock1
-
- on SetupClock2 -- finish set up of cards 4 & 5
- set the location of message to 22,14
- show message
- put "SETUP: 4 of 5 - Updating background for Card 5" into Message
- go to card 5
- doMenu "Background"
- choose select tool
- doMenu "Select All"
- doMenu "Copy Picture"
- doMenu "Background"
- doMenu "Paste Picture"
- choose browse tool
- put card field 1 of card 3 into card field 1
- put "SETUP: 5 of 5 - Updating Card 4 Message" into Message
- go to card 4
- hide button 1
- hide button 2
- hide button 3
- hide button 4
- hide button 5
- hide button 6
- hide button 7
- hide button 8
- show card field 1
- show card field 2
- put card field 1 of card 2 into card field 2
- put empty into card field 1
- -- all done! --
- hide message
- set the location of message to 16,216
- end SetupClock2
-
- on dSL -- display the time left....
- global SL
- if SL < 20 then
- hide card field 1
- hide card field 2
- if SL < 10 then
- hide button 8
- d90
- else
- show button 8
- subtract 10 from SL
- d90
- add 10 to SL
- end if
- else
- if SL < 60 then
- dS
- else
- if SL < 3600 then dMS
- else
- DHMS
- end if
- end if
- end if
- end dSL
-
- on dHMS
- global SL
- put trunc(SL/3600) into H
- put trunc(SL/60 - H * 60) into M
- if M < 10 then put "0" before M
- put SL - H * 3600 - M * 60 into S
- put H & ":" & M & return & S into card field 1
- end dHMS
-
- on dMS
- global SL
- put trunc(SL/60) into M
- put SL - M * 60 into S
- put M & " Min." & return & S & " Sec." into card field 1
- end dMS
-
- on dS
- global SL
- put SL & " Seconds" into card field 1
- end ds
-
-
- -- display final 10 seconds --
- on d90
- global SL
- if SL = 0 then d0
- if SL = 1 then d1
- if SL = 2 then d2
- if SL = 3 then d3
- if SL = 4 then d4
- if SL = 5 then d5
- if SL = 6 then d6
- if SL = 7 then d7
- if SL = 8 then d8
- if SL = 9 then d9
- end d90
-
- on d9
- show button 1
- hide button 2
- show button 3
- show button 4
- show button 5
- show button 6
- show button 7
- end d9
-
- on d9
- show button 1
- hide button 2
- show button 3
- show button 4
- show button 5
- show button 6
- show button 7
- end d9
-
- on d8
- show button 1
- show button 2
- show button 3
- show button 4
- show button 5
- show button 6
- show button 7
- end d8
-
- on d7
- hide button 1
- hide button 2
- show button 3
- show button 4
- show button 5
- hide button 6
- hide button 7
- end d7
-
- on d6
- show button 1
- show button 2
- hide button 3
- show button 4
- show button 5
- show button 6
- show button 7
- end d6
-
- on d5
- show button 1
- hide button 2
- hide button 3
- show button 4
- show button 5
- show button 6
- show button 7
- end d5
-
- on d4
- show button 1
- hide button 2
- show button 3
- show button 4
- hide button 5
- show button 6
- hide button 7
- end d4
-
- on d3
- hide button 1
- hide button 2
- show button 3
- show button 4
- show button 5
- show button 6
- show button 7
- end d3
-
- on d2
- hide button 1
- show button 2
- show button 3
- hide button 4
- show button 5
- show button 6
- show button 7
- end d2
-
- on d1
- hide button 1
- hide button 2
- show button 3
- show button 4
- hide button 5
- hide button 6
- hide button 7
- end d1
-
- on d0
- show button 1
- show button 2
- show button 3
- show button 4
- show button 5
- hide button 6
- show button 7
- end d0
-
- on dZero -- display the zero message card
- global TestRun
- go to card 5
- choose select tool
- doMenu "Select All"
- if TestRun then put 11 into x
- else put 121 into x
- repeat while the mouse is up
- if x > 0 then
- doMenu "Invert"
- subtract 1 from x
- else
- choose browse tool
- end if
- end repeat
- choose browse tool
- end dZero
-
-
-